﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EF4.Core.IoC;

namespace EF4.Core.Logger
{
    public class Logger
    {
        private static ILogger logger;
        public Logger()
        {
            if (logger == null)
            {
                logger = IoCContainer.Current.GetInstance<ILogger>();
            }
        }
        private static ILogger GetInsance()
        {
            if (logger == null)
            {
                logger = IoCContainer.Current.GetInstance<ILogger>();
            }
                return logger;

        }
        public static void Debug(string message) {
            GetInsance().Debug(message);

        }
        public static void Info(string message)
        {
            GetInsance().Info(message);

        }
        public static void Error(string message)
        {
            GetInsance().Error(message);

        }
    }
}
